<?php
/**
 * @author Minh Luan
 * @copyright 2012
 */
 include "../service/recruitmentsService.php";
if(isset($_POST["id"])){
    $companyId = $_POST["id"];
    $recruitmentId = $_POST["recruitmentId"];
    if($_POST["type"] == 3){
        $title = $_POST["title"];
        $location = $_POST["location"];
        $position= $_POST["position"];
        $degree= $_POST["degree"];
        $major= $_POST["major"];
        $description = $_POST["description"];
        
        updateRecruitment($companyId, $recruitmentId, $title, $location, $major, $position, $degree, $description);
        echo "<script>window.location.href='../pc/recruitmentDetail.php?n=".$recruitmentId."'</script>";
    }else{
        echo "<script>window.location.href='../pc/personalInformation.php'</script>";
    }
}else{
    echo "<script>window.location.href='../pc/personalInformation.php'</script>";
}


?>